package action;

import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;

/**
 * Created by hadoop on 17-6-21.
 * 用于s:action调用
 */
public class TagAction extends ActionSupport{

    @Override
//    @Action(value = "tag",results = {
//            @Result(name = "done",location = "/jsp/login-success.jsp",type = "dispatcher")
//    })
    public String execute() throws Exception {
        addActionMessage("来自TagAction.execute的消息！");
        return "done";
    }

//    @Action(value = "tag2",results = {
//            @Result(name = "done",location = "/jsp/login-success.jsp",type = "dispatcher")
//    })
    public String login() throws Exception{
        addActionMessage("来自TagAction.login的消息！");
        return "done";
    }
}
